XML binding syntax

Overview

Writing bindings and observers is cumbersome, and requires us to mix view and business logic, with boilerplate code.

Maestro allows us to follow MVVM pattern, which in turn means less time spent guessing how things end up in our view : We can see in the xml exactly where field values come from, and what field values will end up doing to our view models.

Here is an example of some bindings in Maestro:

vm bindings

In each of the following examples we can see how we use special binding expressions inside the values of our fields.

When maestro-cli encounters these values it will automatically wire up the code (via the helpers in the previous section) to create the binding.

Indicating binding mode

The bracket type indicates the binding mode:

Binding targets

Bindings can be set on any attribute of any node that has an id and on any field in the components interface

Binding arguments

a binding is as follows:

{{name:arg1,arg2, ...}